Flipbooks present code step-by-step and side-by-side with its output. The incremental code/result reveal may help you digest longer manipulation and analysis pipelines as well as plot builds. Long pipelines of code can produce attractive outputs. But they can feel like long streches of highway with no exit or entry ramps. Interacting with such code that has been made into a flipbook is different. The user can isolate and gain insight about short streches along the pipeline that are useful for her or his particular project – all the while engaged by the creativity brought by the project creator in pursuit of their own goal. Flipbooks enable us to isolate how individual functions work in context.
To experience an example, click once in the box the below to initiate the session; then use the right and left arrow to “flip” through the book to see how to make an animated “racing” bar chart of the population size of the most populous countries over time.
Would you like to make a flipbook? We try to make that easy for you with {flipbookr}. To get started have a look at A minimal Flipbook, the template for which will be available once you install the flipbooks package as follows:
devtools::install_github("EvaMaeRey/flipbookr")
You will also likely use xaringan, an rmarkdown presentation builder:
install.packages("xaringan")
Using the steps above, the template will create the following book (you can explore the different modalities here):
Here are a few known issues to watch for:
Here at the University of Denver, we’ve built a few flipbooks. Here are some of them.
If you need a theoretical exploration of the grammar of graphics and its use with ggplot2, see The ggplot2 grammar guide.
The geom pile on is a suppliment to the ggplot grammar guide and shows you a lot of “geoms” that you can use to communicate about your data. Piling up the geoms allows you to see how plot types relate to one another.
ggplot themes takes you through logic of the ggplot2 theme adjustments.